package com.niit;

import com.niit.entity.Student;
import com.niit.mapper.StudentMapper;
import com.niit.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

public class Test_ObjectFactory {
    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtil.getSession();

        StudentMapper studentMapper = sqlSession.getMapper(StudentMapper.class);

        Student student = studentMapper.selectBySid("2020204646");

        System.out.println(student.getSname());
    }
}
